package com.lantosec.hmrp.modules.eval.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.eval.vo.EvalEventExtradutyVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 考评任务事项追加责任 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EvalEventExtraduty extends BaseEntity<EvalEventExtradutyVO> {

    private static final long serialVersionUID = 1L;
    public EvalEventExtraduty(EvalEventExtradutyVO vo){
        this.evalEventExtradutyId = vo.getEvalEventExtradutyId();
        this.evalTaskEventId = vo.getEvalTaskEventId();
        this.rewardOrientation = vo.getRewardOrientation();
        this.rewardValue = vo.getRewardValue();
        this.targetMode = vo.getTargetMode();
        this.targetId = vo.getTargetId();
        this.targetName = vo.getTargetName();
        this.reviewState = vo.getReviewState();
        this.reviewUserId = vo.getReviewUserId();
        this.reviewUser = vo.getReviewUser();
        this.reviewTime = vo.getReviewTime();
    }

    @Override
    public EvalEventExtradutyVO convertToVO(){
        return new EvalEventExtradutyVO(this);
    }


    /**
     * 事件追加责任ID
     */
    @TableId(value = "eval_event_extraduty_id", type = IdType.AUTO)
    private Integer evalEventExtradutyId;

    /**
     * 事件ID
     */
    private Integer evalTaskEventId;

    /**
     * 奖惩形式(1:分 2:钱)
     */
    private Integer rewardOrientation;

    /**
     * 奖惩值(正为加 负为扣)
     */
    private BigDecimal rewardValue;

    /**
     * 责任对象类型(1:部门 2:个人)
     */
    private Integer targetMode;

    /**
     * 责任对象ID
     */
    private String targetId;

    /**
     * 责任对象名称
     */
    private String targetName;

    /**
     * 审核状态
     */
    private Integer reviewState;

    /**
     * 审核人ID
     */
    private String reviewUserId;

    /**
     * 审核人
     */
    private String reviewUser;

    /**
     * 审核时间
     */
    private Date reviewTime;


    public enum ColName {
        eval_event_extraduty_id, eval_task_event_id, reward_orientation, reward_value, target_mode, target_id, target_name, review_state, review_user_id, review_user, review_time,
    }
}
